package com.kingcore.commerce.base.mapper;

import java.util.List;

import org.apache.ibatis.session.RowBounds;

import com.kingcore.commerce.base.bean.CommerceBean;


/** 
 * <strong>Create on : 2012-2-8<br></strong>
 * <strong>Copyright (C) KingCore Software Co.,Ltd.<br></strong>
 * @author wuzeven@163.com<br>
 * @version <strong>e-Commerce v1.0.0</strong><br>
 */
public interface CommerceMapper<T extends CommerceBean, PK extends java.io.Serializable> {
 
	PK insert(T model);

	void delete(PK modelPK);
	
	void update(T model);
	
	T selectOne(PK modelPK);   //load
	
	List<T> selectList();   //findAll

	List<T> selectPagedList(T model, RowBounds rowBounds);
	int selectPagedCount(T model);
	
	int countAll();

	//extend level 1
	//void delete(List<PK> modelPKs);
	
	//extend level 2
	void updateSelective(T model);
		
	List<PK> findAllIds();
	
}
